﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddUser.aspx.cs" Inherits="WEALTH.Manager.User.AddUser" %>
<%@ Register Src="../UserControl/cbxRole.ascx" TagName="cbxRole" TagPrefix="uc1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <link href="../css/admin.global.css" rel="stylesheet" type="text/css" />
    <link href="../css/admin.content.css" rel="stylesheet" type="text/css" />

    <link href="../css/base.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" src="../Js/jquery.min.js"></script>
    <script type="text/javascript" src="../Js/vanadium.js"></script>
    <script type="text/javascript" src="../Js/public_Validation.js"></script>

    <script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="../js/jquery.utils.js"></script>
    <link href="../jBox/Skins/Green/jbox.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../jBox/jquery.jBox-2.3.min.js"></script>
    <script type="text/javascript" src="../js/admin.js"></script>
    <script type="text/javascript">
        // 设置标题
        Index.SetTitle('新增用户');

        function setDataCheck() {
            //            if ($("#txtUserId").val() == "") {
            //                jBox.tip('请输入用户ID！', '提示');
            //                $("#txtUserId").focus();
            //                return false;
            //            }
            //            if ($("#txtPassword").val() == "") {
            //                jBox.tip('请输入密码！', '提示');
            //                $("#txtPassword").focus();
            //                return false;
            //            }
            //            if ($("#txtPasswordConfirm").val() == "") {
            //                jBox.tip('请输入确认密码！', '提示');
            //                $("#txtPasswordConfirm").focus();
            //                return false;
            //            }
            //            if ($("#txtPasswordConfirm").val() != $("#txtPassword").val()) {
            //                jBox.tip('密码和确认密码不一致，请确认！', '提示');
            //                $("#txtPasswordConfirm").focus();
            //                return false;
            //            }           
            //            if ($("#txtUserName").val() == "") {
            //                jBox.tip('请输入真实姓名！', '提示');
            //                $("#txtUserName").focus();
            //                return false;
            //            }

            var arr = [];
            $("#cblRole_cblRole :checkbox:checked").each(function () {
                arr.push($(this).next().html());
            })
            if (arr.length == 0) {
                jBox.tip('请选择用户角色！', '提示');
                return false;
            }

            return true;
        }
    </script>
</head>
<body>
<div class="container">

    <div class="location">当前位置：用户管理 -&gt; 新增用户</div>
    
    <div class="blank10"></div>

    <div class="block">
        <div class="h">
            <span class="icon-sprite icon-list"></span>
            <h3>新增用户</h3>            
        </div>
        <div class="tl corner"></div><div class="tr corner"></div><div class="bl corner"></div><div class="br corner"></div>
        <div class="cnt-wp">
            <div class="cnt form">
                <form id="form1" runat="server">
                <table class="data-form" cellspacing="0" cellpadding="0">
                    <tbody>
                        <tr>
                            <th scope="row">用户ID：</th>
                            <td>                                                            
                                <asp:TextBox ID="txtUserId" runat="server" MaxLength ="20" CssClass ="input-normal :required :id" ></asp:TextBox>
                               
                            </td>                            
                        </tr>
                        <tr>
                            <th scope="row">密码：</th>
                            <td>
                                <asp:TextBox ID="txtPassword" runat="server" MaxLength ="20" CssClass ="input-normal :password" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">确认密码：</th>
                            <td>
                                <asp:TextBox ID="txtPasswordConfirm" runat="server" MaxLength ="20" class="" CssClass ="input-normal :same_as;txtPassword" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">真实姓名：</th>
                            <td><asp:TextBox ID="txtUserName" runat="server" MaxLength ="30"  CssClass ="input-normal :required" ></asp:TextBox></td>
                        </tr>                        
                        <tr>
                            <th scope="row">Email：</th>
                            <td><asp:TextBox ID="txtEmail" runat="server" MaxLength ="30" CssClass ="input-normal :required :email" ></asp:TextBox></td>
                        </tr>
                        <tr>
                            <th scope="row">联系电话：</th>
                            <td><asp:TextBox ID="txtTel" runat="server" MaxLength ="20" CssClass ="input-normal :phone" ></asp:TextBox></td>
                        </tr>                        
                        <tr>
                            <th scope="row">用户状态：</th>
                            <td>
                                <asp:DropDownList ID="ddlStatus" runat="server">
                                    <asp:ListItem Value="1">启用</asp:ListItem>
                                    <asp:ListItem Value="0">禁用</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">用户角色：</th>
                            <td>                               
                                 <uc1:cbxRole ID="cblRole" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"></th>
                            <td>                                
                            <span class="btn-ctl-span"><asp:Button ID="btnSubmit" runat="server" Text="确定" OnClientClick="return setDataCheck();" onclick="btnSubmit_Click"/></span>
                            <span class="btn-ctl-span"><input  type ="button" id="btnBack" value="返回" onclick="javascript:Index.Open('User/UserList.aspx');"/></span>
                            
                            </td>
                            
                        </tr>
                    </tbody>
                </table>
                </form>
            </div>
        </div>
    </div>

</div>    
</body>
</html>
